package cn.iocoder.yudao.module.eval.controller.admin.score.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 成绩汇总 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class EvalScoreSummaryBaseVO {

    @Schema(description = "计划ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "计划ID不能为空")
    private Long planId;

    @Schema(description = "参评人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "参评人员ID不能为空")
    private Long candidateId;

    @Schema(description = "申报等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "四级/中级工")
    @NotBlank(message = "申报等级不能为空")
    @Size(max = 50, message = "申报等级长度不能超过50个字符")
    private String appliedLevel;

    @Schema(description = "总分", requiredMode = Schema.RequiredMode.REQUIRED, example = "85.5")
    @NotNull(message = "总分不能为空")
    @DecimalMin(value = "0", message = "总分不能小于0")
    @DecimalMax(value = "100", message = "总分不能大于100")
    private BigDecimal totalScore;

    @Schema(description = "加权分", requiredMode = Schema.RequiredMode.REQUIRED, example = "82.3")
    @NotNull(message = "加权分不能为空")
    @DecimalMin(value = "0", message = "加权分不能小于0")
    @DecimalMax(value = "100", message = "加权分不能大于100")
    private BigDecimal weightedScore;

    @Schema(description = "评价结果", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "评价结果不能为空")
    private Integer evaluationResult;

    @Schema(description = "等级", example = "良好")
    @Size(max = 20, message = "等级长度不能超过20个字符")
    private String gradeLevel;

    @Schema(description = "是否最终", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @NotNull(message = "是否最终不能为空")
    private Boolean isFinal;

    @Schema(description = "复核状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "复核状态不能为空")
    private Integer reviewStatus;

    @Schema(description = "汇总备注", example = "成绩计算正常")
    @Size(max = 500, message = "汇总备注长度不能超过500个字符")
    private String summaryComments;

}
